<?php $hotwords = hotkeywords(); ?>
<div id="top" style="border-bottom:1px solid #F93; height:90px;">
	<div style="border-bottom:1px solid #F93; margin-bottom:10px; line-height:25px; "><a href="/">爱淘首页</a> | <a href="brand.php">品牌大全</a> | <a href="category.php">所有分类</a></div>
    <form name="theForm" id="theForm" action="itemsearch.php" method="get" style="margin-bottom:20px;">
	<table cellpadding="0" cellspacing="0" width="800px">
    <tr><td>
   <p>商品搜索:<input type="text" name="q" size="50" value="<?php echo isset($q) ? $q : '' ;?>" />
    	<select name="cate" id="cate">
    		<option value="0">全部分类</option>
    		<?php foreach($cates['item_cats']['item_cat'] as $cat):?>
    			<?php $selected = ''; if($cat['cid'] == $cate){ $selected='selected'; } ?>
				<option value="<?php echo $cat['cid'];?>" <?php echo $selected;?>><?php echo $cat['name'];?></option>
    		<?php endforeach;?>
    	</select>
        <button type="submit" name="s" value="so" style="border:1px solid #f60; background:#F60; padding:3px 4px; width:80px;">搜商品</button></p>
        <p style="margin-bottom:10px; padding-left:50px; line-height:30px;">
            热搜:
            <?php foreach($hotwords as $word): ?>
                <a href="itemsearch.php?q=<?php echo urlencode($word['keyword']); ?>"><?php echo $word['keyword']; ?></a> &nbsp; &nbsp;
            <?php endforeach; ?>
        </p>
</td><td></td></tr>
    </table>
    </form>	
</div>
